<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">
<h:body>
	<p:dialog widgetVar="funcAddRegistroDialogWidget"
		id="funcAddRegistroDialogId" height="150" width="500" modal="true"
		closable="true" draggable="false" resizable="false">
		<h:form id="funcAddRegistroDialogForm" prependId="false">
			#{bundle.funcAddRegistroTo}: <h:outputText
				value="#{funcionarioMB.funcComRegistros.nome}" />
			<br />
			<p:autoComplete forceSelection="true" minQueryLength="3"
				value="#{funcionarioMB.registro}" label="#{bundle.registro}" required="true"
				var="registro" itemLabel="#{registro.numero}" itemValue="#{registro}"
				completeMethod="#{funcionarioMB.complete}" dropdown="true" />
			<br />
			<br />

			<p:commandButton value="#{bundle.add}" icon="ui-icon-plus"
				action="#{funcionarioMB.addRegistroAoFunc()}"
				update=":messageGrowl :funcionariosForm:funcionariosTable"
				oncomplete="closeDialogIfSucess(xhr, status, args, funcAddRegistroDialogWidget, 'funcAddRegistroDialogId')" />
			<p:commandButton value="#{bundle.cancel}" icon="ui-icon-cancel"
				onclick="funcAddContratoDialogWidget.hide();" type="button" />
		</h:form>
	</p:dialog>
</h:body>
</html>